
import React, {Component} from 'react'
import { Route } from 'react-router-dom'
import createHistory from 'history/createBrowserHistory'
import { ConnectedRouter } from 'react-router-redux'
import App from '../containers/App'
import BookIntroContainer from '../containers/BookIntroContainer'
import BookContent from '../containers/BookcontentContainer'
const history = createHistory()
class Routes extends Component{
    render() {
        return (
            <ConnectedRouter history={history}>
                <div>
                    <Route exact path="/" component={App}/>
                    <Route path="/book/:id" component={BookIntroContainer}/>
                    <Route path="/read/:id/:chapter" component={BookContent}/>
                </div>
            </ConnectedRouter>
        )
    }
}

export default Routes 